package com.gu.controller;

import entity.CommonResult;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * Description:  首页登陆 控件
 *
 * @Autor: Rolin
 * datetime: 05-17-12:00
 */
@Api(tags = "教师登陆")
@RestController
@RequestMapping("/eduService")
@CrossOrigin  //解决前后端的跨域问题
public class EduLoginController {

    @PostMapping("/login")
    public CommonResult edu_login(){
        //返回 身份令牌
        return CommonResult.success().data("token","admin");
    }

    @GetMapping("/info")
    public CommonResult edu_info(){
        return CommonResult.success().data("roles","teacher").data("name","擎天柱").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }
}
